%image of fourDisk pocs reconstruction
iptsetpref('ImshowBorder','tight');
imshow(testPOCSfourDisk,[0,1e-6]); colormap gray;
axis image off; axis([64 192 64 192]);

%image of fourDisk FBP reconstruction
iptsetpref('ImshowBorder','tight');
imshow(APdata_fourDisk,[0,1e-6]); colormap gray;
axis image off; axis([64 192 64 192]);

%image of resin pocs reconstruction
iptsetpref('ImshowBorder','tight');
imshow(testPOCS_RC2_5000.*DBPmask,[0,0.14]); colormap gray;
axis image off; axis([128 512-128 128 512-128]);

%image of resin fbp reconstruction
iptsetpref('ImshowBorder','tight');
imshow(APdata,[0,0.14]); colormap gray;
axis image off; axis([128 512-128 128 512-128]);

%image of resin truncated fbp reconstruction
iptsetpref('ImshowBorder','tight');
imshow(FBPtrunc,[0,0.14]); colormap gray;
axis image off; axis([128 512-128 128 512-128]);

% vertical profile plot
centerRC2 = DBPmask.*testPOCS_RC2_5000;
plot(linspace(-1, 1, 512),APdata(:,256),'b',linspace(-1, 1, 512),FBPtrunc(:,256),'-.k',...
    linspace(-1, 1, 512),centerRC2(:,256),'--r','LineWidth',2);
axis([-0.6 0.6 -0.06 0.14]);
xlabel('Position (a.u.)'); ylabel('Reconstructed amplitude (a.u.)');
legend('FBP', 'Truncated FBP', 'Iterative');
grid on;
% vertical profile plot
centerRC2 = DBPmask.*testPOCS_RC2_5000;
plot(linspace(-1, 1, 512),APdata(256,:),'b',linspace(-1, 1, 512),FBPtrunc(256,:),'-.k',...
    linspace(-1, 1, 512),centerRC2(256,:),'--r','LineWidth',2);
axis([-0.6 0.6 -0.06 0.14]);
xlabel('Position (a.u.)'); ylabel('Reconstructed amplitude (a.u.)');
legend('FBP', 'Truncated FBP', 'Iterative');
grid on;

% vertical profile plot four disk
plot(linspace(-1, 1, 256),APdata_fourDisk(:,128)*10^6,'b',linspace(-1, 1, 256),testPOCSfourDisk(:,128)*10^6,'-.k','LineWidth',2);
axis([-0.6 0.6 0 1]);
xlabel('Position (a.u.)'); ylabel('Reconstructed amplitude (a.u.)');
legend('A priori','Iterative');
grid on;


% vertical profile plot four disk
plot(linspace(-1, 1, 256),APdata_fourDisk(256-104,:)*10^6,'b',linspace(-1, 1, 256),testPOCSfourDisk(256-104,:)*10^6,'-.k','LineWidth',2);
axis([-0.6 0.6 0 1]);
xlabel('Position (a.u.)'); ylabel('Reconstructed amplitude (a.u.)');
legend('A priori','Iterative');
grid on;

% iterations vertical profile plot
centerRC2_5 = DBPmask.*testPOCS_RC2_5;
centerRC2_50 = DBPmask.*testPOCS_RC2_50;
centerRC2_500 = DBPmask.*testPOCS_RC2_500;
centerRC2_5000 = DBPmask.*testPOCS_RC2_5000;
plot(linspace(-1, 1, 512),APdata(:,256),'b',...
    linspace(-1, 1, 512),centerRC2_5(:,256),'-r',...
    linspace(-1, 1, 512),centerRC2_50(:,256),'-r',...
    linspace(-1, 1, 512),centerRC2_500(:,256),'-r');
axis([-0.6 0.6 -0.06 0.14]);
xlabel('Position (a.u.)'); ylabel('Reconstructed amplitude (a.u.)');
legend('FBP', 'Truncated FBP', 'Iterative');